#pragma once
#include "group.hpp"
#include <string>
#include <vector>

/////////////////////////////////////////////////////////////////////////////////////////////
/*

    GroupModel是一个group表的数据操作类
    
*/
class GroupModel
{
public:
    /*············································

                        创建群组                
    
    ············································*/
    bool CreateGroup(Group& group);
    /*············································

                        加入群组
    
    ············································*/
    void AddGroup(int userid, int groupid, const std::string& role);
    /*············································

                  查询用户所在群组的信息
    
    ············································*/
    std::vector<Group> QueryGroups(int userid);
    /*············································

                    
    
    ············································*/
    std::vector<int> QueryGroupUsers(int userid, int groupid);
};